Integrand size = 28, antiderivative size = 635 \[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=-\frac {2 \left (6 a e^2 g^2 (e f-10 d g)-c \left (19 e^3 f^3-57 d e^2 f^2 g+63 d^2 e f g^2-35 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{315 c e g^3}+\frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {4 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) (f+g x)^{3/2} \sqrt {a+c x^2}}{315 c g^3}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}+\frac {4 \sqrt {-a} \left (21 a^2 e^2 g^4+3 a c g^2 \left (3 e^2 f^2-16 d e f g-21 d^2 g^2\right )+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{315 c^{3/2} g^4 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {4 \sqrt {-a} \left (c f^2+a g^2\right ) \left (3 a e g^2 (e f-10 d g)+c f \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right ),-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{315 c^{3/2} g^4 \sqrt {f+g x} \sqrt {a+c x^2}} \]
[Out]
Time = 1.26 (sec) , antiderivative size = 635, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {933, 1668, 858, 733, 435, 430} \[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\frac {4 \sqrt {-a} \sqrt {\frac {c x^2}{a}+1} \sqrt {f+g x} \left (21 a^2 e^2 g^4+3 a c g^2 \left (-21 d^2 g^2-16 d e f g+3 e^2 f^2\right )+c^2 f^2 \left (21 d^2 g^2-24 d e f g+8 e^2 f^2\right )\right ) E\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{315 c^{3/2} g^4 \sqrt {a+c x^2} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}}}-\frac {4 \sqrt {-a} \sqrt {\frac {c x^2}{a}+1} \left (a g^2+c f^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}} \left (3 a e g^2 (e f-10 d g)+c f \left (21 d^2 g^2-24 d e f g+8 e^2 f^2\right )\right ) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right ),-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{315 c^{3/2} g^4 \sqrt {a+c x^2} \sqrt {f+g x}}+\frac {4 \sqrt {a+c x^2} (f+g x)^{3/2} \left (7 a e^2 g^2-c \left (21 d^2 g^2-24 d e f g+8 e^2 f^2\right )\right )}{315 c g^3}-\frac {2 \sqrt {a+c x^2} \sqrt {f+g x} \left (6 a e^2 g^2 (e f-10 d g)-c \left (-35 d^3 g^3+63 d^2 e f g^2-57 d e^2 f^2 g+19 e^3 f^3\right )\right )}{315 c e g^3}+\frac {2 e \sqrt {a+c x^2} (f+g x)^{5/2} (e f-3 d g)}{63 g^3}+\frac {2 \sqrt {a+c x^2} (d+e x)^3 \sqrt {f+g x}}{9 e} \]
[In]
[Out]
Rule 430
Rule 435
Rule 733
Rule 858
Rule 933
Rule 1668
Rubi steps \begin{align*} \text {integral}& = \frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {\int \frac {(d+e x)^2 \left (a (3 e f-d g)-2 (c d f-a e g) x+c (e f-3 d g) x^2\right )}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{9 e} \\ & = \frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}+\frac {2 \int \frac {-\frac {1}{2} a c g^2 \left (5 e^3 f^3-15 d e^2 f^2 g-21 d^2 e f g^2+7 d^3 g^3\right )-c f g \left (a e^2 g^2 (5 e f-36 d g)+c \left (e^3 f^3-3 d e^2 f^2 g+7 d^3 g^3\right )\right ) x+\frac {1}{2} c g^2 \left (4 a e^2 g^2 (4 e f+9 d g)-c \left (11 e^3 f^3-33 d e^2 f^2 g+21 d^2 e f g^2+21 d^3 g^3\right )\right ) x^2+c e g^3 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) x^3}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{63 c e g^4} \\ & = \frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {4 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) (f+g x)^{3/2} \sqrt {a+c x^2}}{315 c g^3}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}+\frac {4 \int \frac {-\frac {1}{4} a c g^5 \left (42 a e^3 f g^2-c \left (23 e^3 f^3-69 d e^2 f^2 g+231 d^2 e f g^2-35 d^3 g^3\right )\right )-\frac {1}{2} c g^4 \left (21 a^2 e^3 g^4+3 a c e g^2 \left (5 e^2 f^2-36 d e f g-21 d^2 g^2\right )-c^2 f \left (11 e^3 f^3-33 d e^2 f^2 g+42 d^2 e f g^2-35 d^3 g^3\right )\right ) x-\frac {3}{4} c^2 g^5 \left (6 a e^2 g^2 (e f-10 d g)-c \left (19 e^3 f^3-57 d e^2 f^2 g+63 d^2 e f g^2-35 d^3 g^3\right )\right ) x^2}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{315 c^2 e g^7} \\ & = -\frac {2 \left (6 a e^2 g^2 (e f-10 d g)-c \left (19 e^3 f^3-57 d e^2 f^2 g+63 d^2 e f g^2-35 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{315 c e g^3}+\frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {4 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) (f+g x)^{3/2} \sqrt {a+c x^2}}{315 c g^3}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}+\frac {8 \int \frac {-\frac {3}{2} a c^2 e g^7 \left (3 a e g^2 (3 e f+5 d g)-c f \left (e^2 f^2-3 d e f g+42 d^2 g^2\right )\right )-\frac {3}{4} c^2 e g^6 \left (21 a^2 e^2 g^4+3 a c g^2 \left (3 e^2 f^2-16 d e f g-21 d^2 g^2\right )+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) x}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{945 c^3 e g^9} \\ & = -\frac {2 \left (6 a e^2 g^2 (e f-10 d g)-c \left (19 e^3 f^3-57 d e^2 f^2 g+63 d^2 e f g^2-35 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{315 c e g^3}+\frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {4 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) (f+g x)^{3/2} \sqrt {a+c x^2}}{315 c g^3}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}+\frac {\left (2 \left (c f^2+a g^2\right ) \left (3 a e g^2 (e f-10 d g)+c f \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right )\right ) \int \frac {1}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{315 c g^4}-\frac {\left (2 \left (21 a^2 e^2 g^4+3 a c g^2 \left (3 e^2 f^2-16 d e f g-21 d^2 g^2\right )+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right )\right ) \int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx}{315 c g^4} \\ & = -\frac {2 \left (6 a e^2 g^2 (e f-10 d g)-c \left (19 e^3 f^3-57 d e^2 f^2 g+63 d^2 e f g^2-35 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{315 c e g^3}+\frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {4 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) (f+g x)^{3/2} \sqrt {a+c x^2}}{315 c g^3}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}-\frac {\left (4 a \left (21 a^2 e^2 g^4+3 a c g^2 \left (3 e^2 f^2-16 d e f g-21 d^2 g^2\right )+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{315 \sqrt {-a} c^{3/2} g^4 \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {a+c x^2}}+\frac {\left (4 a \left (c f^2+a g^2\right ) \left (3 a e g^2 (e f-10 d g)+c f \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{315 \sqrt {-a} c^{3/2} g^4 \sqrt {f+g x} \sqrt {a+c x^2}} \\ & = -\frac {2 \left (6 a e^2 g^2 (e f-10 d g)-c \left (19 e^3 f^3-57 d e^2 f^2 g+63 d^2 e f g^2-35 d^3 g^3\right )\right ) \sqrt {f+g x} \sqrt {a+c x^2}}{315 c e g^3}+\frac {2 (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2}}{9 e}+\frac {4 \left (7 a e^2 g^2-c \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) (f+g x)^{3/2} \sqrt {a+c x^2}}{315 c g^3}+\frac {2 e (e f-3 d g) (f+g x)^{5/2} \sqrt {a+c x^2}}{63 g^3}+\frac {4 \sqrt {-a} \left (21 a^2 e^2 g^4+3 a c g^2 \left (3 e^2 f^2-16 d e f g-21 d^2 g^2\right )+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{315 c^{3/2} g^4 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {4 \sqrt {-a} \left (c f^2+a g^2\right ) \left (3 a e g^2 (e f-10 d g)+c f \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} F\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{315 c^{3/2} g^4 \sqrt {f+g x} \sqrt {a+c x^2}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 25.89 (sec) , antiderivative size = 809, normalized size of antiderivative = 1.27 \[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\frac {\sqrt {f+g x} \left (\frac {2 \left (a+c x^2\right ) \left (2 a e g^2 (4 e f+30 d g+7 e g x)+c \left (21 d^2 g^2 (f+3 g x)+6 d e g \left (-4 f^2+3 f g x+15 g^2 x^2\right )+e^2 \left (8 f^3-6 f^2 g x+5 f g^2 x^2+35 g^3 x^3\right )\right )\right )}{c g^3}-\frac {4 \left (g^2 \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}} \left (21 a^2 e^2 g^4+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )-3 a c g^2 \left (-3 e^2 f^2+16 d e f g+21 d^2 g^2\right )\right ) \left (a+c x^2\right )-i \sqrt {c} \left (\sqrt {c} f+i \sqrt {a} g\right ) \left (21 a^2 e^2 g^4+c^2 f^2 \left (8 e^2 f^2-24 d e f g+21 d^2 g^2\right )-3 a c g^2 \left (-3 e^2 f^2+16 d e f g+21 d^2 g^2\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} (f+g x)^{3/2} E\left (i \text {arcsinh}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )+\sqrt {a} \sqrt {c} g \left (\sqrt {c} f+i \sqrt {a} g\right ) \left (21 i a^{3/2} e^2 g^3-3 a \sqrt {c} e g^2 (e f-10 d g)+c^{3/2} f \left (-8 e^2 f^2+24 d e f g-21 d^2 g^2\right )-3 i \sqrt {a} c g \left (-2 e^2 f^2+6 d e f g+21 d^2 g^2\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} (f+g x)^{3/2} \operatorname {EllipticF}\left (i \text {arcsinh}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right ),\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )\right )}{c^2 g^5 \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}} (f+g x)}\right )}{315 \sqrt {a+c x^2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1141\) vs. \(2(551)=1102\).
Time = 1.40 (sec) , antiderivative size = 1142, normalized size of antiderivative = 1.80
method | result | size |
elliptic | \(\text {Expression too large to display}\) | \(1142\) |
risch | \(\text {Expression too large to display}\) | \(1677\) |
default | \(\text {Expression too large to display}\) | \(4352\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 510, normalized size of antiderivative = 0.80 \[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\frac {2 \, {\left (2 \, {\left (8 \, c^{2} e^{2} f^{5} - 24 \, c^{2} d e f^{4} g - 66 \, a c d e f^{2} g^{3} - 90 \, a^{2} d e g^{5} + 3 \, {\left (7 \, c^{2} d^{2} + 5 \, a c e^{2}\right )} f^{3} g^{2} + 3 \, {\left (63 \, a c d^{2} - 11 \, a^{2} e^{2}\right )} f g^{4}\right )} \sqrt {c g} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right ) + 6 \, {\left (8 \, c^{2} e^{2} f^{4} g - 24 \, c^{2} d e f^{3} g^{2} - 48 \, a c d e f g^{4} + 3 \, {\left (7 \, c^{2} d^{2} + 3 \, a c e^{2}\right )} f^{2} g^{3} - 21 \, {\left (3 \, a c d^{2} - a^{2} e^{2}\right )} g^{5}\right )} \sqrt {c g} {\rm weierstrassZeta}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right )\right ) + 3 \, {\left (35 \, c^{2} e^{2} g^{5} x^{3} + 8 \, c^{2} e^{2} f^{3} g^{2} - 24 \, c^{2} d e f^{2} g^{3} + 60 \, a c d e g^{5} + {\left (21 \, c^{2} d^{2} + 8 \, a c e^{2}\right )} f g^{4} + 5 \, {\left (c^{2} e^{2} f g^{4} + 18 \, c^{2} d e g^{5}\right )} x^{2} - {\left (6 \, c^{2} e^{2} f^{2} g^{3} - 18 \, c^{2} d e f g^{4} - 7 \, {\left (9 \, c^{2} d^{2} + 2 \, a c e^{2}\right )} g^{5}\right )} x\right )} \sqrt {c x^{2} + a} \sqrt {g x + f}\right )}}{945 \, c^{2} g^{5}} \]
[In]
[Out]
\[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\int \sqrt {a + c x^{2}} \left (d + e x\right )^{2} \sqrt {f + g x}\, dx \]
[In]
[Out]
\[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\int { \sqrt {c x^{2} + a} {\left (e x + d\right )}^{2} \sqrt {g x + f} \,d x } \]
[In]
[Out]
\[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\int { \sqrt {c x^{2} + a} {\left (e x + d\right )}^{2} \sqrt {g x + f} \,d x } \]
[In]
[Out]
Timed out. \[ \int (d+e x)^2 \sqrt {f+g x} \sqrt {a+c x^2} \, dx=\int \sqrt {f+g\,x}\,\sqrt {c\,x^2+a}\,{\left (d+e\,x\right )}^2 \,d x \]
[In]
[Out]